<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>区域工程负责人评价</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    {CSS href="__ADDONSTATIC__css/font.css" /}
    {CSS href="__ADDONSTATIC__css/xadmin.css" /}
    {js href='__ADDONSTATIC__js/jquery-3.2.1.min.js' /}
    {CSS href="__ADDONSTATIC__css/css.css" /}

    {js href='__ADDONSTATIC__js/xadmin.js' /}
    {js href='__ADDONSTATIC__js/util.js' /}
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    {js href='__ADDONSTATIC__lib/layui/layui.js' /}
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body style="background: #f0eeee;">
<div class="center">
    <div class="answer_bg" style="text-align: center">
        <br>
        <h1>问题解决</h1>
    </div>
    <div class="answer_bg">
        <div class="project_k">
            <div class="project_title">
                <i></i><strong>项目名称：</strong>
                <span>{$project.name}</span>
            </div>
        </div>
        <div class="project_k">
            <div class="project_title">
                    <i></i><strong>项目进度：</strong>
                <span>{$status.description}</span>
            </div>
        </div>
    </div>
    <div class="answer_bg">
        <div class="project_k">
            <div class="project_title">
                <strong>甲方提出问题：</strong>
                <div style="font-size: 16px">&nbsp;&nbsp;&nbsp;&nbsp;百度知道是由全球最大的中文搜索引擎百度自主研发、基于搜索的互动式知识问答分享平台。百度知道是由全球最大的中文搜索引擎百度自主研发、基于搜索的互动式知识问答分享平台。</div>
            </div>

        </div>
        <div class="project_k">
            <div class="project_stit">
                <span>项目解决方案：</span>
            </div>
            <div style="clear: both"></div>
            <div class="project_sele">
                <textarea name="remark" placeholder="请输入内容" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="project_k">
            <div class="project_stit">
                <span>解决结果：</span>
            </div>
            <div style="clear: both"></div>
            <div class="project_sele">
                <textarea name="remark" placeholder="请输入内容" class="layui-textarea"></textarea>
            </div>
        </div>

        <div class="reg_btn2">
            <button onclick="sendMessage({$project.id},{$status.id})" class="layui-btn layui-btn-lg layui-btn-normal">提交</button>
        </div>
    </div>
</div>

</div>
</div>

<script>
    //选项卡
    layui.use('element', function () {
        var element = layui.element;
    });

    /**
     * 保存评价信息
     * @param projectId
     * @param statusId
     */
    function sendMessage(projectId,statusId) {
        var $sel = $(".project_k select");
        var data = {};
        data.projectId = projectId;
        data.statusId = statusId;
        data.remark = $("textarea").val();
        for(let sel of $sel){
            data[sel.name] = sel.value;
        }
        ajaxUrl("{:addonUrl('Index/addEvaluate')}",
                data, function (data) {
                    layer.alert(data.message, {}, function (index) {
                        layer.close(index);
                        if(data.code){
                            // 微信页面关闭
                            WeixinJSBridge.invoke('closeWindow', {}, function (res) {});
                        }
                    });
                });
    }
</script>
</body>

</html>